package com.jy.rhin.valid;


import com.jy.rhin.infra.cda.XValid;
import org.springframework.stereotype.Component;

/**
 * @Author 姚俊
 * @Date 2023/3/7 15:48
 * @Description T/F验证器
 */
@Component
public class TFValid extends AbsValid{

    @Override
    public String validate(XValid xValid, String value) {
        if(Boolean.TRUE.toString().equalsIgnoreCase(value)
            || Boolean.FALSE.toString().equalsIgnoreCase(value)){
            return null;
        }else{
            return "不合符格式true/false";
        }
    }
}
